package com.Algorithm.HUAWEI.one20211020;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: zjz
 * @Date: 2022/02/27/13:08
 * @Description:
 * @Target:
 */
public class 字符串排序 {
    public static void main(String[] args) throws IOException {
        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
        int len = Integer.valueOf(bufferedReader.readLine());

        ArrayList list = new ArrayList();
        for (int i = 0; i < len; i++) {
            list.add(bufferedReader.readLine());
        }
        Collections.sort(list);


        for (Object o : list) {
            System.out.println(o);
        }

    }
}
